// DriveNotes. Copyright (c) 2011, Andrei Senchuk. All rights reserved.
package net.taviscaron.drivenotes.server.service.endpoint;

import javax.jws.WebMethod;
import javax.jws.WebService;
import net.taviscaron.drivenotes.shared.exceptions.InvalidEntityException;
import net.taviscaron.drivenotes.shared.model.entity.User;
import net.taviscaron.drivenotes.shared.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Register service
 * @author Andrei Senchuk
 */
@WebService(serviceName = "RegisterService")
public class RegisterServiceEndpoint implements RegisterService {
    @Autowired
    private RegisterService registerService;

    @WebMethod
    public User registerUser(User user) throws InvalidEntityException {
        return registerService.registerUser(user);
    }
}
